// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f5f5f5;
}

// 清除浮动
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

// 文本截断
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis-2 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

// 通用布局类
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

// 间距类
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.ml-20 { margin-left: 20px; }
.mr-10 { margin-right: 10px; }
.mr-20 { margin-right: 20px; }

.pt-10 { padding-top: 10px; }
.pt-20 { padding-top: 20px; }
.pb-10 { padding-bottom: 10px; }
.pb-20 { padding-bottom: 20px; }
.pl-10 { padding-left: 10px; }
.pl-20 { padding-left: 20px; }
.pr-10 { padding-right: 10px; }
.pr-20 { padding-right: 20px; }

// 页面容器
.page-container {
  padding: 20px;
  background: #fff;
  margin: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

// 表格工具栏
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  
  .toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

// 搜索表单
.search-form {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  
  .el-form-item {
    margin-bottom: 0;
  }
}

// 状态标签
.status-tag {
  &.pending { color: #e6a23c; }
  &.processing { color: #409eff; }
  &.completed { color: #67c23a; }
  &.cancelled { color: #f56c6c; }
  &.closed { color: #909399; }
}

// 优先级标签
.priority-tag {
  &.low { color: #909399; }
  &.medium { color: #e6a23c; }
  &.high { color: #f56c6c; }
  &.urgent { 
    color: #fff; 
    background: #f56c6c;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
}

// 客户等级标签
.level-tag {
  &.A { 
    color: #fff; 
    background: #f56c6c; 
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
  &.B { 
    color: #fff; 
    background: #e6a23c; 
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
  &.C { 
    color: #fff; 
    background: #409eff; 
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
  &.D { 
    color: #fff; 
    background: #909399; 
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
}

// 分页容器
.pagination-container {
  padding: 20px 0;
  text-align: right;
}

// 详情页面样式
.detail-container {
  .detail-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    .detail-title {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 10px;
    }
  }
  
  .detail-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

// 统计卡片
.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  
  .stat-number {
    font-size: 28px;
    font-weight: 600;
    color: #409eff;
  }
  
  .stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
  }
}

// 响应式样式
@media (max-width: 768px) {
  .page-container {
    margin: 10px;
    padding: 15px;
  }
  
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    
    .toolbar-left,
    .toolbar-right {
      justify-content: center;
    }
  }
} 